package com.lrz.dao;

import com.lrz.pojo.Comment;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends MongoRepository<Comment, String> {

    List<Comment> findByArticleIdAndParentIdOrderByPublishDateDesc(String articleId, String parentId);

    List<Comment> findByParentIdOrderByPublishDateAsc(String parentId);

    Comment findBy_id(String id);

}
